package com.xyoto.community.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xyoto.community.po.UserTitlePO;
import com.xyoto.community.utils.PictureUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 他人用户页用户信息vo
 */
@Data
@ApiModel("他人用户页用户信息vo")
@NoArgsConstructor
public class OtherPeopleUserVo {
    @ApiModelProperty("用户id")
    private Integer userId;

    @ApiModelProperty("头像")
    private String avatarUrl;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("个性签名")
    private String signature;

    @ApiModelProperty("两个人的关注状态,1未关注,2我关注他，3为互关，4只是我关注他")
    private Short followStatus;

    @ApiModelProperty("活跃度排行")
    private Integer rank;

    @ApiModelProperty("头衔")
    @JsonProperty("userTitle")
    private UserTitlePO userTitlePO;

    /**
     *
     * @param userId 用户id
     * @param avatarUrl 用户头像
     * @param nickname 昵称
     * @param signature 个性签名
     * @param rank 用户活跃度排名
     */
    public OtherPeopleUserVo(Integer userId, String avatarUrl, String nickname, String signature, Integer rank,Short followStatus) {
        this.userId = userId;
        this.avatarUrl = PictureUtils.addPrefix(avatarUrl);
        this.nickname = nickname;
        this.signature = signature ;
        this.rank = rank;
        this.followStatus = followStatus;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = PictureUtils.addPrefix(avatarUrl);
    }
}
